package com.gongqi.gift.clients;

import com.gongqi.gift.domain.LoginUser;
import com.gongqi.gift.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class LoginUserClientFallbackFactory implements FallbackFactory<LoginUserClient> {
    @Override
    public LoginUserClient create(Throwable throwable) {
        return new LoginUserClient() {
            @Override
            public AjaxResult addOrUpdate(LoginUser loginUser) {
                throwable.printStackTrace();
                return null;
            }
        };
    }
}
